//
//  PosApplyCollectionReusableView.m
//  NewPro
//
//  Created by RYX on 2019/7/2.
//  Copyright © 2019 何荧红. All rights reserved.
//

#import "PosApplyCollectionReusableView.h"

@implementation PosApplyCollectionReusableView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self setUI];
    }
    return self;
}

- (void)setUI{
    
    UIView *topView = [[UIView alloc] init];
    topView.backgroundColor = BLUECOLOR;
    [self addSubview:topView];
    [topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.left.mas_equalTo(5);
        make.right.mas_equalTo(-5);
        make.height.mas_equalTo(30);
    }];
    
    UILabel *titleLa = [[UILabel alloc] init];
    self.titleLa = titleLa;
    [topView addSubview:titleLa];
    titleLa.textColor = UIColor.whiteColor;
    titleLa.font = [UIFont systemFontOfSize:15];
    [titleLa mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.top.bottom.mas_equalTo(0);
    }];
    
    UIView *bottomView = [[UIView alloc] init];
    bottomView.backgroundColor = [UIColor colorWithHexString:@"FEE5C7"];
    [self addSubview:bottomView];
    [bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(topView.mas_bottom).offset(0);
        make.bottom.mas_equalTo(0);
        make.left.mas_equalTo(5);
        make.right.mas_equalTo(-5);
    }];
    
    UILabel *desLa = [[UILabel alloc] init];
    self.desLa = desLa;
    desLa.numberOfLines = 0;
    [bottomView addSubview:desLa];
    desLa.textColor = [UIColor colorWithHexString:@"F86912"];
    desLa.font = [UIFont systemFontOfSize:10];
    [desLa mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(10);
        make.top.bottom.mas_equalTo(0);
        make.centerX.mas_equalTo(bottomView);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

@end
